<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = {
            A: [{
                city: "武汉"
            }, {
                city: "广州"
            }],
            B: [{
                city: "深圳"
            }, {
                city: "广州"
            }],
            C: [{
                city: "上海"
            }, {
                city: "武汉"
            }]
        }
        /* 
        var citys  = ["武汉","广州","深圳","上海"]
         */
        // var list = []
        // for(k in arr){
        //     // arr[k].forEach(item=> {

        //     //     list.push(item)
                
        //     // });
        //     list.push(...arr[k])
            
        // }
        // var res =[];
        // list.forEach(k=>{
        //     if(!res.includes(k.city)){
        //         res.push(k.city)
        //     }
        // })
        // console.log(res)
        var values = Object.values(arr)
        console.log(values)
        var res =[];
        values.forEach(item=>{
            console.log(item)
            item.forEach(k=>{
                if(!res.includes(k.city)){
                res.push(k.city)
            }
            })
            
        })
        console.log(res)
    </script>
</body>
</html>